﻿using AMAP.Domain;
using AMAP.ServiceInterfaces.Common;
using System.Collections.Generic;

namespace AMAP.ServiceInterfaces
{
    public interface IExternalCompositionService : IRepositoryService<ExternalComposition>
    {
        /// <summary>
        /// Gets and returns ExternalComposition based on foreign key ExternalOrderId
        /// </summary>
        /// <param name="ExternalOrderId">Searched foreign key</param>
        /// <returns>ExternalComposition or null if this external order hasn't initialy be used for a basket creation</returns>
        ExternalComposition GetByExternalOrderId(int ExternalOrderId);

        /// <summary>
        /// Computes and returns the list of ExternalComposition for the given BasketId
        /// </summary>
        /// <param name="BasketId">Id of the basket</param>
        /// <returns>List of ExternalComposition</returns>
        IList<ExternalComposition> GetListByBasketId(int BasketId);
    }
}
